package cn.sample.moreitems.particle;

import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleProvider;
import net.minecraft.client.particle.SpriteSet;
import net.minecraft.core.particles.SimpleParticleType;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@OnlyIn(Dist.CLIENT)
public class Provider implements ParticleProvider<SimpleParticleType> {

    private final SpriteSet sprites;
    public Provider(SpriteSet sprites) { this.sprites = sprites; }
    @Override
    public Particle createParticle(SimpleParticleType type, ClientLevel level,
                                   double x, double y, double z,
                                   double dx, double dy, double dz) {
        return new CustomExplosionParticle(level, x, y, z, dx, dy, dz, sprites);
    }

}
